package com.efast.cafe.portal;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration;

/**
 * CAF 基础服务
 * 如有自定义业务模块 参考注解配置：
 * 		@SpringBootApplication
 * 		@EnableDiscoveryClient
 * 		@EnableAutoConfiguration(exclude = {PageHelperAutoConfiguration.class})
 * 		@ComponentScan(basePackages ={"com.efast.cafe.framework","com.efast.cafe.commponent","业务模块包"})
 * 		@EnableFeignClients(basePackages={"com.efast.cafe.portal.remote"})
 * @author xuanming.feng
 */
@SpringBootApplication
@EnableDiscoveryClient //启用服务注册与发现
@EnableAutoConfiguration(exclude = {PageHelperAutoConfiguration.class})
@ComponentScan(basePackages = {"com.efast.cafe.framework","com.efast.cafe.portal"
		,"com.efast.cafe.msg","com.efast.cafe.commponent","com.efast.cafe.code"})
@EnableAsync
@EnableConfigurationProperties
public class PortalServiceApplication extends SpringBootServletInitializer{

	public static void main(String[] args) {
		SpringApplication.run(PortalServiceApplication.class, args);
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return super.configure(builder);
	}
	
}
